<?php
class Halaman extends base_model
{
	var $field_file_title;
	
	function __Construct()
	{
		parent::__Construct();
		$this->init("halaman","id_halaman","judul");
		$this->field_file_title = "judul_file";
	}
	
	/**
	* contoh judul file : tentang_basmallah_org.html
	*/
	function get_by_judul_file($title=null)
	{
		if($title!=null)
		{
			if(strlen($title)>0)
			{
				$rec = $this->db->select("*")->from($this->table_name)->where($this->field_file_title,$title)->get();
				if($rec->num_rows()>0)
				{
					return $rec->row();
				}
				return false;
			}
		}
		return false;
	}
}
?>